﻿@inherits BaseComponent

<GridCol Span="Span">
    <FormItem Label="@Label" Required="Required" Rules="rules">
        <DataItemValue IsFixed Value="this">
            @ChildContent
        </DataItemValue>
    </FormItem>
</GridCol>

@code {
    private FormValidationRule[] rules => Rules ?? this.ToRules(Context);

    public Type Type { get; set; } = typeof(string);
    
    [Parameter] public int Span { get; set; }
    [Parameter] public string Label { get; set; }
    [Parameter] public bool Required { get; set; }
    [Parameter] public FormValidationRule[] Rules { get; set; }
    [Parameter] public RenderFragment ChildContent { get; set; }
}